<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">
	
	<ui:composition template="/pages/layout/mainLayout.xhtml">
		<ui:define name="bodyComUsuario">	
		<div class="post">
		   <h:outputText value="#{bundle['locanet.Filme.filmes']}" />
		   <h:form>
		   <p:dataTable value="#{locacaoBean.top10}" var="filme" rendered="#{!empty locacaoBean.top10}">
		        <p:column >
			      <h:commandLink action="#{filmeBean.view}" >
			         <f:setPropertyActionListener target="#{filmeBean.entity.id}" value="#{filme.id}"/>
			         <img class="img_busca" style="margin:0px" src="#{facesContext.externalContext.request.contextPath}/imgview?img=#{filme.id}"/>
			      </h:commandLink>
		      <div class="descricao_busca" style="margin:0px;text-align:right;">
		        <h:commandLink action="#{filmeBean.view}">
		          <f:setPropertyActionListener target="#{filmeBean.entity.id}" value="#{filme.id}" />
		          <b><h:outputText value="#{filme.titulo}" /></b>
		          <h:outputText style="color: red" value="#{bundle['locanet.entidades.status.inativo']}" rendered="#{filme.status==0}"/><br/>
		          <h:outputText value="#{filme.estilo.nome}" /><br/>
		          <h:outputText value="#{filme.dataChegada}" >
		              <f:convertDateTime pattern="dd/MM/yyyy"/>
		          </h:outputText>
		        </h:commandLink><br/>
		        <h:commandLink value="#{bundle['locanet.entidades.lista.editar']}" action="#{filmeBean.openUpdate}" >
		          <f:setPropertyActionListener target="#{filmeBean.entity.id}" value="#{filme.id}" />
		        </h:commandLink> 
		        <h:commandLink value="#{bundle['locanet.entidades.lista.excluir']}" action="#{filmeBean.remove}" >
		          <f:setPropertyActionListener target="#{filmeBean.entity.id}" value="#{filme.id}" />
		        </h:commandLink><br/>
		      </div>
		        </p:column>
		   </p:dataTable>
		   </h:form>
		</div>
		</ui:define>
	</ui:composition>
</html>